#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <sys/types.h>       
#include <sys/socket.h>
//#include <netinet/in.h>
//#include <netinet/ip.hi>
#include <arpa/inet.h>
#include <string.h>
#include <errno.h>


#define MAXLINE		4096
#define LISTENQ		1024
#define SA 			struct sockaddr 

int main(int argc,char ** argv)
{
	int listenfd,connfd;
	socklen_t len;
	struct sockaddr_in seraddr,cliaddr;
	char buff[MAXLINE];
	time_t ticks;

	if((listenfd = socket(AF_INET,SOCK_STREAM,IPPROTO_TCP))<0)
	{
		perror("socket()");
		exit(1);
	}
	
	bzero(&seraddr,sizeof(seraddr));
	seraddr.sin_family = AF_INET;
	seraddr.sin_addr.s_addr = htonl(INADDR_ANY);
	seraddr.sin_port = htons(13);

	if(bind(listenfd,(SA *) &seraddr,sizeof(seraddr)) != 0 )
	{
		perror("bind()");
		exit(1);
	}

	if(listen(listenfd,LISTENQ)!=0)
	{
		perror("listen()");
		exit(1);
	}

	for(;;)
	{
		
	
	}


	exit(0);
}
